<%@ include file="template/CommonHeader.jsp" %>
<link href="/FMTOOL_WEB/resources/plugins/tables/dataTables/jquery.dataTables.css" type="text/css" rel="stylesheet" />

    <div id="wrapper">
        <%@ include file="template/LeftNavigator.jsp" %>


        <!--Body content-->
        <div id="content" class="clearfix">
            <div class="contentwrapper"><!--Content wrapper-->

                <%@ include file="template/PageHeader.jsp" %>

                <!-- Build page from here: -->
                <%@ include file="template/CommonSuccessMessage.jsp" %>
                <%@ include file="template/CommonErrorMessage.jsp" %>
                
                <div class="row-fluid">
                      
                       
                        <div class="span9">

                            <div class="box gradient">

                                <div class="title">
                                    <h4>
                                        <span>Node Attribute</span>
                                    </h4>
									
                                </div>
                                <div class="content noPad clearfix" id="nodeHierarchyDiv">
                                     
                                  
                                </div>

                            </div><!-- End .box -->

                        </div><!-- End .span9 -->
                        
                        <div class="span3">

                            <div class="box">

                                <div class="title">

                                    <h4>
                                        <span class="icon16 icomoon-icon-list-view"></span>
                                        <span>Segment-KPI Selection</span>
                                    </h4>
                                    <a href="#" class="minimize">Minimize</a>
                                </div>
                                <div class="content">
                                    <select  name="user.userTypeId" id="segmentId" class="nostyle" style="width:100%;" onchange="fetchNodeSelectBox(this.value)">
                                    		<option value="none">Select a Segment</option>
                                  		<s:iterator value="segmentList" id="segmentLst">
                                  	   	    <option value="<s:property value="segmentId" />"><s:property value="segmentName" /></option>
				     					</s:iterator>
	                                </select>
	                                <div id="kpiDiv">
	                                <select  name="user.userTypeId" id="kpiId" class="nostyle" style="width:100%;" onchange="nodeAttributeList(this.value)">
                                    		<option value="none">Select a KPI</option>
	                                </select>
	                                </div> 
	                                 
                                </div>

                            </div><!-- End .box -->

                        </div><!-- End .span3 -->
                        

                    </div><!-- End .row-fluid -->

                <!-- End page Content: -->
                
            </div>
            <!-- End contentwrapper -->
        </div><!-- End #content -->


    </div><!-- End #wrapper -->
    
 
  

<%@ include file="template/CommonJS.jsp" %>    

 <script type="text/javascript" src="/FMTOOL_WEB/resources/plugins/tables/dataTables/jquery.dataTables.min.js"></script>
 <script type="text/javascript" src="/FMTOOL_WEB/resources/plugins/tables/responsive-tables/responsive-tables.js"></script><!-- Make tables responsive -->
 <script type="text/javascript" src="/FMTOOL_WEB/resources/js/datatable.js"></script><!-- Init plugins only for page -->
 <script type="text/javascript">
  function fetchNodeSelectBox(segmentId)
  {
    if(segmentId=="none")
       return;
    $("#kpiDiv").html("<img src='/FMTOOL_WEB/resources/images/loaders/circular/011.gif' border='0' />");
			  		  var x= $.ajax({
    		  		  url: "nodeListString.action",
			  		  type: 'POST',
		      		  async: false,
			  		  data: "segmentId=" +segmentId
			  		  }).responseText;
				      
	$("#kpiDiv").html(x);
  }
  function nodeAttributeList(kpiId)
  {
    if(kpiId=="none")
     return;

    $("#nodeHierarchyDiv").html("<img src='/FMTOOL_WEB/resources/images/loaders/circular/011.gif' border='0' />");
			  		  var x= $.ajax({
    		  		  url: "nodeAttributeList.action",
			  		  type: 'POST',
		      		  async: false,
			  		  data: "kpiId=" +kpiId
			  		  }).responseText;
				
				      
				      $("#nodeHierarchyDiv").html(x);
  }
  
 </script>
    
		 
<%@ include file="template/CommonFooter.jsp" %>    

